<?php
use yii\helpers\Html;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use backend\models\user\TeacherInfo;
$teacher = TeacherInfo::Teacherrmd(8);
?>
<div dy-v="00-00-10-00" id="EX_famousTeacher" class="ibox">
	<div class="ibox-in">
		<div class="ibox-head">
			<div class="ibox-tit-text">名师推荐</div>
		</div>
		<div class="ibox-body famous-teacher-list">
			<div id="bar_carousel133" class="carousel slide" data-ride="carousel">
				<div class="carousel-curindex-totle">
					<ol class="carousel-indicators">
						<?php for ($i=0; $i < count($teacher); $i++) { 
							if ($i == 0) {
						?>
							<li data-target="#bar_carousel133" data-slide-to="<?php echo $i; ?>" class="active"><?php echo ($i+1); ?></li>
							<?php }else{ ?>
								<li data-target="#bar_carousel133" data-slide-to="<?php echo $i; ?>" class=""><?php echo ($i+1); ?></li>
							<?php }?>
						<?php } ?>
					</ol>/<?php echo count($teacher)?>
				</div>
				<div class="carousel-inner" role="listbox">
					<?php foreach ($teacher as $key => $value) { 
						if ($key == 0) {
						?>
							<div class="item active">
						<?php }else{ ?>
							<div class="item">
						<?php }?>
							<a href="<?php echo Url::to(['teacher/teacherinfo']);?>?teacher_id=<?= Html::encode($value['teacher_id']) ?>" target="_blank">
								<span class="column-col-l">
									<span class="u-photo u-photo-btn">
										<img src="http://files.bwphp.com/file/image/show/120/120?path=<?= Html::encode($value['teacher_thumb']) ?>" alt="">
									</span>
								</span>
								<span class="column-col column-full">
									<span class="u-name"><?= Html::encode($value['teacher_name']) ?></span>
									<span class="u-introduction"><?= Html::encode($value['teacher_desc']) ?></span>
								</span>
							</a>
						</div>
					<?php }?>
				</div>
				<div class="carousel-trun">
					<a class="carousel-control" href="#bar_carousel133" role="button" data-slide="prev">&lt;</a>
					<a class="carousel-control" href="#bar_carousel133" role="button" data-slide="next">&gt;</a>
				</div>
			</div>
		</div>
	</div>
</div>